package com.cbb.display.service.impl;

import com.cbb.display.entity.Funnel;
import com.cbb.display.entity.Region;
import com.cbb.display.dao.RegionMapper;
import com.cbb.display.service.RegionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author bigbomb
 * @since 2020-02-26
 */
@Service
public class RegionServiceImpl extends ServiceImpl<RegionMapper, Region> implements RegionService {
	@Override
	public boolean addRegion(List<Region> noidcollection, List<Region> idcollection) {
		// TODO Auto-generated method stub
		boolean status = false;
		try {
			if(noidcollection.size()>0)
		    {
		    	status = super.saveBatch(noidcollection);
		    }
			if(idcollection.size()>0)
			{
				status = super.updateBatchById(idcollection);
			}
			return status;
		}catch (RuntimeException e) {
			// TODO: handle exception
			status = false;
			return status;
		}
		// TODO Auto-generated method stub
		
	}
}
